package cn.edu.tjnu.singleton;

import org.junit.Test;

public class TestDriver_Singleton {

	@Test
	public void testSingleTon() {
		// 获取单件对象的实例1
		SingleTon s1 = SingleTon.getSingleTonInstance();
		// 获取单件对象的实例2
		SingleTon s2 = SingleTon.getSingleTonInstance();
		SingleTon s3 = SingleTon.getSingleTonInstance();

		System.out.println("s1==s2:" + (s1 == s3));
	}
}
